package cn.tedu.store.service;

import cn.tedu.store.entity.Address;
import cn.tedu.store.service.ex.*;

import java.util.List;

public interface IAddressService {
	/**
	 * 收货地址上限
	 */
	 int ADDRESS_MAX_COUNT=20;
	 
	 void addnew(Address address, Integer uid, String username)
			      throws AddressCountLimitException,InsertException;
	 
	 List<Address> getByUid(Integer uid);

	 void setDefault(Integer aid, Integer uid, String username) throws AdderssNotFoundException,AccessDeniedException,UpdateException;
	 
	 void delete(Integer aid, Integer uid, String username) throws AdderssNotFoundException,AccessDeniedException,
	      DeleteException,UpdateException;
	 

	 Address getByAid(Integer aid);
}
